// 对uni.request 进行二次封装
let baseURL='/VueHandler'

export default function (url,method='get',data,headers){
		
	return new Promise((resolve,reject)=>{
		console.log(uni.getStorageSync("token"),"8888888888888888")
			uni.request({
				url:baseURL+url,
				method:method,
				data:data,
				header: {
				  token:"Bearer "+uni.getStorageSync("token")
			   },
				success(res){
					resolve(res.data)
				},
				fail(err){
					reject(err)
				}
			})
	})
	
}